extends Area2D
class_name GlobalArea
signal show_health_anim(size : int)

var health_instance : HealthAnim
func _ready() -> void:
	_init_parent_signal()
	health_instance = GlobalInstance.HEALTH_ANIM.duplicate().instantiate()
	call_deferred("add_child",health_instance)

func _init_parent_signal() -> void :
	show_health_anim.connect(_show_health_anim)

func _show_health_anim(size : int) -> void :
	health_instance.health_size = size
	health_instance.show()
